import '../area_style.dart';
import '../line_style.dart';
import '../tooltip.dart';
import 'series.dart';

import 'package:json_annotation/json_annotation.dart';

part 'radar_series.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class RadarEmphasis {
  var focus;
  var blurScope;
  SeriesItemStyle? itemStyle;
  SeriesLabel? label;
  LineStyle? lineStyle;
  AreaStyle? areaStyle;

  RadarEmphasis(
      {this.focus,
      this.blurScope,
      this.itemStyle,
      this.label,
      this.lineStyle,
      this.areaStyle});

  factory RadarEmphasis.fromJson(Map<String, dynamic> json) =>
      _$RadarEmphasisFromJson(json);

  Map<String, dynamic> toJson() => _$RadarEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class RadarBlurSelectEmphasis {
  SeriesItemStyle? itemStyle;
  SeriesLabel? label;
  LineStyle? lineStyle;
  AreaStyle? areaStyle;

  RadarBlurSelectEmphasis(
      {this.itemStyle, this.label, this.lineStyle, this.areaStyle});

  factory RadarBlurSelectEmphasis.fromJson(Map<String, dynamic> json) =>
      _$RadarBlurSelectEmphasisFromJson(json);

  Map<String, dynamic> toJson() => _$RadarBlurSelectEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class RadarData {
  var name;
  var value;
  var symbol;
  var symbolSize;
  var symbolRotate;
  var symbolKeepAspect;
  var symbolOffset;
  SeriesLabel? label;
  LabelLine? labelLine;
  SeriesItemStyle? itemStyle;
  RadarBlurSelectEmphasis? emphasis;
  RadarBlurSelectEmphasis? blur;
  RadarBlurSelectEmphasis? select;
  Tooltip? tooltip;

  RadarData(
      {this.name,
      this.value,
      this.symbol,
      this.symbolSize,
      this.symbolRotate,
      this.symbolKeepAspect,
      this.symbolOffset,
      this.label,
      this.labelLine,
      this.itemStyle,
      this.emphasis,
      this.blur,
      this.select,
      this.tooltip});

  factory RadarData.fromJson(Map<String, dynamic> json) =>
      _$RadarDataFromJson(json);

  Map<String, dynamic> toJson() => _$RadarDataToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class RadarSeries extends Series {
  var id;
  var type = 'radar';
  var name;
  var radarIndex;
  var symbol;
  var symbolSize;
  var symbolRotate;
  var symbolKeepAspect;
  var symbolOffset;

  SeriesLabel? label;
  SeriesItemStyle? itemStyle;
  LineStyle? lineStyle;
  AreaStyle? areaStyle;
  RadarEmphasis? emphasis;
  RadarBlurSelectEmphasis? blur;
  RadarBlurSelectEmphasis? select;
  var selectedMode;

  var zlvel;
  var z;
  var silent;

  var animation;
  var animationThreshold;
  var animationDuration;
  var animationEasing;
  var animationDelay;
  var animationDurationUpdate;
  var animationEasingUpdate;
  var animationDelayUpdate;
  Tooltip? tooltip;

  RadarSeries(
      {this.id,
      this.name,
      this.radarIndex,
      this.symbol,
      this.symbolSize,
      this.symbolRotate,
      this.symbolKeepAspect,
      this.symbolOffset,
      this.label,
      this.itemStyle,
      this.lineStyle,
      this.areaStyle,
      this.emphasis,
      this.blur,
      this.select,
      this.selectedMode,
      this.zlvel,
      this.z,
      this.silent,
      this.animation,
      this.animationThreshold,
      this.animationDuration,
      this.animationEasing,
      this.animationDelay,
      this.animationDurationUpdate,
      this.animationEasingUpdate,
      this.animationDelayUpdate,
      this.tooltip});

  factory RadarSeries.fromJson(Map<String, dynamic> json) =>
      _$RadarSeriesFromJson(json);

  Map<String, dynamic> toJson() => _$RadarSeriesToJson(this);
}
